<!doctype html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="stylesheet" type="text/css"
    href="https://gcore.jsdelivr.net/gh/CeriseBouquet/static@master/fonts/RoGSans_sliced/font.css" />
  <link rel="stylesheet" type="text/css"
    href="https://gcore.jsdelivr.net/gh/CeriseBouquet/static@master/fonts/GlowSans/font.css" />
  <title class="i18n" data-i18n="title">Blue Archive Logo Generator</title>
  <script type="module" crossorigin src="/Ba-logo/assets/ba-logo-index-179ae651.js"></script>
  <link rel="stylesheet" href="/Ba-logo/assets/ba-logo-index-3937e82a.css">
      <style>
    /* 弹窗背景遮罩 */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(8px);
      z-index: 1000;
      opacity: 0;
      transition: opacity 0.3s ease-in-out;
    }
    .modal-overlay.active {
      display: flex;
      justify-content: center;
      align-items: center;
      opacity: 1;
    }
    /* 弹窗内容 */
    .modal {
      background: white;
      border-radius: 16px;
      width: 90%;
      max-width: 400px;
      padding: 20px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
      text-align: center;
      position: relative;
      transform: scale(0.8);
      transition: transform 0.3s ease-in-out;
    }
    .modal-overlay.active .modal {
      transform: scale(1);
    }
    .modal img {
      width: 100%;
      max-width: 356px;
      margin-bottom: -10px;
    }
    .modal p {
      margin-bottom: 10px;
      font-size: 1rem;
      color: #555;
    }
    .modal button {
      background: #3b82f6;
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 1rem;
      transition: background 0.3s ease;
    }
    .modal button:hover {
      background: #2563eb;
    }
  </style>
</head>

<body>
  <header>
    <h1 class="i18n mt-24 mb-20 text-center font-bold" data-i18n="heading">BlueArchive-Style Logo Generator</h1>
  </header>
  <section class="canvas-wrapper flex place-content-center">
    <div class="relative my-auto">
      <canvas id="canvas" height="250" width="900"></canvas>
      <div id='loading' class="absolute w-full h-full top-0 left-0 backdrop-blur-sm bg-slate-400/5 z-50 hidden">
        <div class="flex place-content-center h-full">
          <span class="loading loading-spinner loading-lg mx-auto"></span>
        </div>
      </div>
    </div>
  </section>
  <section class="w-full mx-auto my-6 flex flex-col sm:w-[32rem]">
    <div class="flex justify-center my-4 px-2">
      <input id="textL" type="text" placeholder="Type here" value="Blue"
        class="input input-bordered input-md input-primary mr-1 w-40 max-w-[14rem] flex-1" />
      <input id="textR" type="text" placeholder="Type here" value="Archive"
        class="input input-bordered input-md input-secondary ml-1 w-40 max-w-[14rem] flex-1" />
    </div>
    <div class="my-2">
      <label class="cursor-pointer label justify-start mx-10">
        <input type="checkbox" class="toggle toggle-primary" id="transparent" />
        <span class="i18n label-text text-base ml-4 mr-16" data-i18n="transparent-background">Transparent
          Background</span>
      </label>
    </div>
    <div class="mx-6 my-4">
      <div class="collapse collapse-arrow bg-base-100">
        <input type="checkbox" />
        <div class="i18n collapse-title font-medium" data-i18n="advance">Advance settings</div>
        <div class="collapse-content">
          <div class="i18n" data-i18n="halo-cross">Halo & Cross position</div>
          <div class="flex justify-evenly my-4">
            <span class="flex-1"><span class="mr-2">X</span><input type="number" placeholder="Type here" value="-15"
                class="input input-bordered input-sm input-primary w-32 mr-2" id="graphX" /></span>
            <span class="flex-1"><span class="mr-2">Y</span><input type="number" placeholder="Type here" value="0"
                class="input input-bordered input-sm input-primary w-32" id="graphY" /></span>
          </div>
        </div>
      </div>
    </div>
    <div class="flex justify-evenly my-4">
      <span><button class="i18n btn btn-primary" id="save" data-i18n="save">Save</button></span>
      <span><button class="i18n btn btn-primary" id="copy" data-i18n="copy">Copy</button></span>
    </div>
    <label class="swap cursor-default">
      <input type="checkbox" disabled id="message-switch" />
      <div class="alert alert-success swap-on">
        <svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
            d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
        </svg>
        <span class="i18n font-medium" data-i18n="copy-success">Image copied</span>
      </div>
    </label>
  </section>
      <!-- 弹窗 -->
  <div id="modalOverlay" class="modal-overlay">
    <div class="modal">
      <img src="/Ba-logo/assets/BlueArchive.png" alt="蔚蓝档案LOGO">
      <p>老师！欢迎回来！</p>
      <p>先生、お帰りなさい！</p>
      <button id="confirmButton">我知道了</button>
    </div>
  </div>
  <footer>
    <section class="w-full mx-auto my-8 sm:w-96 px-4">
      <h2 class="i18n text-2xl font-bold leading-loose" data-i18n="font-title">Used Fonts</h2>
      <ul class="list-disc leading-relaxed text-lg font-normal mb-8 px-6">
        <li>
          <span class="i18n" data-i18n="main-font">Main font: </span>
          <a href="https://www.morisawa.co.jp/fonts/specimen/1646" target="_blank">RoG2サンセリフStd B</a>
        </li>
        <li>
          <span class="i18n" data-i18n="fallback-font">Fallback font: </span>
          <a href="https://github.com/welai/glow-sans" target="_blank" class="i18n" data-i18n="glow">Wêlai Glow Sans</a>
        </li>
      </ul>
      <h2 class="i18n text-2xl font-bold leading-loose" data-i18n="github-repo">GitHub repo</h2>
      <a href="https://github.com/nulla2011/Bluearchive-logo" target="_blank"
        class="text-md">https://github.com/nulla2011/Bluearchive-logo</a>
              <h2 class="i18n text-2xl font-bold leading-loose" data-i18n="原仓库整合可直接使用版本">原仓库整合可直接使用版本</h2>
      <a href="https://github.com/JiangNan-QwQ/BA-Logo" target="_blank"
        class="text-md">https://github.com/JiangNan-QwQ/BA-Logo</a>
    </section>
  </footer>
      <script>
    const modalOverlay = document.getElementById('modalOverlay');
    const confirmButton = document.getElementById('confirmButton');

    // 打开弹窗
    function openModal() {
      modalOverlay.classList.add('active');
    }

    // 关闭弹窗
    function closeModal() {
      modalOverlay.classList.remove('active');
    }

    // 页面加载时显示弹窗
    window.addEventListener('DOMContentLoaded', () => {
      openModal();
    });

    // 绑定“我知道了”按钮关闭弹窗
    confirmButton.addEventListener('click', closeModal);

    // 点击遮罩区域关闭弹窗
    modalOverlay.addEventListener('click', (event) => {
      if (event.target === modalOverlay) {
        closeModal();
      }
    });
  </script>
</body>

</html>